export const ViewMode = {
  Read: 0,
  Phonetics: 1,
  Annotations: 2,
  Translations: 3,
  Notes: 4
};

export const MatScreenMode = {
  Symmetry: 0,
  Wide: 1
};

// 素材的种类，参见mats表格kind字段
export const MatKind = {
  Article: 0,
  Note: 1,
  Chapter: 2, 
	Coll: 3, // Collection，文集
	Book: 4,
	BookSet: 5,
	Poem: 6,
	PoemSet: 7,
	Pin: 8,
  PinSet: 9,
  Project: 10,
  Dir: 11,
  File: 12,
  People: 13, // 这个字段是留位给tag的kind用的。现在tag的kind直接使用MatKind，未来可以考虑把people也做成一种素材，可以评论、可以注释。
  Part: 14, 
};

export const MatFormat = {
  Number: 0,
  Markdown: 1, // 这里默认的是Markdown，未来可能需要修改名称
  Poem: 2,
  Link: 3,
  Image: 4,
  Audio: 5,
  Video: 6,
  Project: 7,
  Dir: 8,
  File: 9,
  Toc: 10,
  Phonetics: 11,
};

// 笔记的种类，参见数据库中的notes表格kind字段 
export const NoteKind = {
  Star: 0,
	Note: 1,
	Intro: 2,
	Phonetics: 3,
	Reference: 4,
	Translation: 5,
	Lecture: 6,
  Comment: 7,
  Link: 8,
  VLink: 9, // 外站视频链接
};

export const NoteSection = {
  Note: 0,
  Intro: 1,
  Phonetics: 2,
  Reference: 3,
  Translation: 4,
  Lecture: 5,
  Comment: 6,
};

export const NoteSectionNames = new Map();
{
  let n = NoteSectionNames;
  n.set(NoteSection.Note, "笔记")
  n.set(NoteSection.Intro, "简介");
  n.set(NoteSection.Phonetics, "注音");
  n.set(NoteSection.Reference, "引用");
  n.set(NoteSection.Translation, "翻译");
  n.set(NoteSection.Lecture, "讲解");
  n.set(NoteSection.Comment, "评论");
}

// 笔记的影响范围，参见数据库中的notes表格scope字段
export const NoteScope = {
  Char: 0, // 字
  Word: 1, // 词
  Line: 2, // 行（一般也是句子）
  Para: 3, // 段落
  Article: 4, // 文章
  Collection: 5, // 不同层次的集合，包括文集、书的一部、书籍、书集等
};


export const NoteKindNames = new Map();
{
  let n = NoteKindNames;
  n.set(NoteKind.Star, "标星");
  n.set(NoteKind.Note, "笔记");
  n.set(NoteKind.Intro, "简介");
  n.set(NoteKind.Phonetics, "注音");
  n.set(NoteKind.Reference, "引用");
  n.set(NoteKind.Translation, "翻译");
  n.set(NoteKind.Lecture, "讲解");
  n.set(NoteKind.Comment, "评论");
  n.set(NoteKind.Link, "外站链接");
  n.set(NoteKind.VLink, "外站视频");
}


export const TagCat = {
  Topic: 0, // 话题
  Event: 1,  // 事件
  People: 2,  // 相关人物
  Place: 3, // 相关地点
  Time: 4, // 相关时段
  Emotion: 5, // 情绪
  Genre: 6, // 类别
  Era: 7, // 朝代
  Style: 8, // 风格
  Field: 9, // 领域
  Language: 10, // 语言
  Tune: 11, // 词曲牌
  Rhyme: 12, // 韵脚
};

export const TagCatNames = new Map();
{
  let n = TagCatNames;
  n.set(TagCat.Topic, "话题");
  n.set(TagCat.Event, "事件");
  n.set(TagCat.People, "人物");
  n.set(TagCat.Place, "地点");
  n.set(TagCat.Time, "时间");
  n.set(TagCat.Emotion, "情绪");
  n.set(TagCat.Genre, "体裁");
  n.set(TagCat.Era, "时代");
  n.set(TagCat.Style, "风格");
  n.set(TagCat.Language, "语言");
  n.set(TagCat.Field, "领域");
  n.set(TagCat.Tune, "词曲牌");
  n.set(TagCat.Rhyme, "韵脚");
}

export const MatMode = {
  Fav: 0,
  Discover: 1,
  Resources: 2,
};

export const TagCatsForMatKind = new Map();
{
  let m = TagCatsForMatKind;
  m.set(MatKind.Article, [TagCat.Topic]);
  m.set(MatKind.Poem, [TagCat.Genre, TagCat.Era, TagCat.Style, TagCat.Tune, TagCat.Rhyme]);
  m.set(MatKind.Project, [TagCat.Field, TagCat.Language]);
  m.set(MatKind.Pin, [TagCat.Topic, TagCat.Event, TagCat.People, TagCat.Place, TagCat.Time, TagCat.Emotion]);
  m.set(MatKind.Book, [TagCat.Topic, TagCat.People, TagCat.Era]);
  m.set(MatKind.Coll, [TagCat.Field, TagCat.Topic]);
}

export default {
  MatKind,
  MatMode,
  MatFormat,
  NoteKind,
  NoteScope,
  TagCat,
};